import {html, TemplateResult} from 'lit';
import type {Meta, StoryObj} from '@storybook/web-components';
import "../../../echarts/bar/lit-bar-polar-stack.ts"
import {BarPolarStackProps} from "../../../echarts/bar/lit-bar-polar-stack.ts";

const meta: Meta<BarPolarStackProps> = {
    title: 'Echarts/LitBarPolarStack',
    tags: ['autodocs'],
    parameters: {
        docs: {
            description: {
                component: 'tooltip以及其他各类事件暂时无法在storybook中使用，具体请参考echarts的文档',
            },
        }
    },
    render: (args: BarPolarStackProps): TemplateResult => {
        return html`<lit-bar-polar-stack 
            .chartId=${args.chartId}
            .width=${args.width}
            .height=${args.height}
            .radiusAxisData=${args.radiusAxisData}
            .legend=${args.legend}
            .seriesData=${args.seriesData}
        />`;
    },
    argTypes: {
        chartId: { control: 'text' },
        width: { control: 'text' },
        height: { control: 'text' },
        radiusAxisData: { control: 'object' },
        legend: { control: 'object' },
        seriesData: { control: 'object' },
    },
};

export default meta;
type Story = StoryObj<BarPolarStackProps>;

export const Default: Story = {
    args: {
        chartId: 'lit-bar-polar-stack-chart',
        width: '1200px',
        height: '600px',
        radiusAxisData: ['Mon', 'Tue', 'Wed', 'Thu'],
        legend: ['A', 'B', 'C'],
        seriesData: [
            [1, 2, 3, 4],
            [2, 4, 6, 8],
            [1, 2, 3, 4]
        ]
    },
};